﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="Web_Demo.WebForm1" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">

    <%if (Request.Cookies["user"] == null && Request.Cookies["pass"] == null)
      {%>
    <br />
    Username
    <asp:TextBox ID="txt_user" runat="server"></asp:TextBox>
    <br />
    Password
    <asp:TextBox ID="txt_pass" runat="server"></asp:TextBox>
    <br />
    <asp:Button ID="btn_Login" runat="server" onclick="btn_Login_Click" 
        Text="Login" />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    
    <asp:CheckBox ID="CheckBox1" runat="server" Text="Remember" />
    <%}else{%> &nbsp;Chào, &nbsp;<%=Request.Cookies["user"].Value%> !!!&nbsp;&nbsp;&nbsp;
    <asp:Button ID="btn_DeleteCookie" 
        runat="server" onclick="btn_DeleteCookie_Click" Text="Logout" />
        <%}%>
    </form>
</body>
</html>
